<table>
	<tr>
		<td>
			<a class="button" href="<?php echo $this->baseUrl() ?>/cpproducts/item">
				<div style="background:url(<?php echo $this->baseUrl() ?>/public/images/plus_16.png);" class="inb">Dodaj <?php echo $this->yih2 ?></div>
			</a>
		</td>
	</tr>
</table>

<div class="bglist">
	<div class="bglistq">
	<form id="formrap" method="get">
			<table cellspacing="1" cellpadding="4" class="tlist">
				<tr>
					<th style="font-size:11px;">Producent</th>
					<th style="font-size:11px;">Kategoria</th>
					<th style="font-size:11px;">Podkategoria</th>
					<th style="font-size:11px;">Tag</th>
					<th style="font-size:11px;">Nazwa</th>
					<th style="font-size:11px;" colspan="2">Filtruj</th>
				</tr>
				<tr>
					<td><?php echo $this->formSelect( 'producent', $this->producent, null, $this->producent_list ) ?></td>
					<td><?php echo $this->formSelect( 'kategoria', $this->kategoria, null, $this->kat_list ) ?></td>
					<td><?php echo $this->formSelect( 'podkategoria', $this->podkategoria, null, $this->podkat_list ) ?></td> 
					<td><?php echo $this->formSelect( 'tag', $this->tag, null, $this->tag_list ) ?></td>
					<td><?php echo $this->formText( 'nazwa', $this->nazwa ); ?></td>
					<td>
						<a onclick="$('#formrap').submit()" class="button" href="javascript::void(null)">
							<div style="background:url(<?php echo $this->baseUrl() ?>/public/images/save_16.png);" class="inb">OK</div>
						</a>
					</td>
					<td>
						<a class="button" href="<?php echo $this->baseUrl() ?>/cpproducts">
							<div style="background:url(<?php echo $this->baseUrl() ?>/public/images/up_16.png);" class="inb">CLEAR</div>
						</a>
					</td>
			</table>
		</form>
		<table cellspacing="1" cellpadding="6" class="tlist">
			<tr>
				<th>Id</th>
				<th>Nazwa</th>
				<th>Galeria</th>
				<th>Akcje</th>
			</tr>
			<?php foreach( $this->list as $item ) { ?>
			<tr>
				<td><?php echo $item['p_id'] ?></td>
				<td><?php echo $item['name_pl'] ?></td>
				<td><a href="<?php echo $this->baseUrl() . '/cpgaleries/itemphotos/id/' . $item['galeries_g_id']; ?>">zobacz &raquo;</a></td>
				<td>
					<a href="<?php echo $this->baseUrl() ?>/cpproducts/item/id/<?php echo $item['p_id'] ?>" class="edit">Edytuj</a>
					<a onclick="return confirmDelete();" href="<?php echo $this->baseUrl() ?>/cpproducts/delete/id/<?php echo $item['p_id'] ?>" class="delete">Usuń</a>
				</td>
			</tr>
			<?php } ?>
		</table>
	</div>
</div>
<?php  echo $this->render('global/pager.phtml'); ?>